package com.ruoyi.gcgl.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruoyi.gcgl.mapper.GcProjectCbpjitemMapper;
import com.ruoyi.gcgl.domain.GcProjectCbpjitem;
import com.ruoyi.gcgl.service.IGcProjectCbpjitemService;
import com.ruoyi.common.core.text.Convert;

/**
 * 项目成本预估项次Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-11-27
 */
@Service
public class GcProjectCbpjitemServiceImpl implements IGcProjectCbpjitemService 
{
    @Autowired
    private GcProjectCbpjitemMapper gcProjectCbpjitemMapper;

    /**
     * 查询项目成本预估项次
     * 
     * @param id 项目成本预估项次主键
     * @return 项目成本预估项次
     */
    @Override
    public GcProjectCbpjitem selectGcProjectCbpjitemById(Long id)
    {
        return gcProjectCbpjitemMapper.selectGcProjectCbpjitemById(id);
    }

    /**
     * 查询项目成本预估项次列表
     * 
     * @param gcProjectCbpjitem 项目成本预估项次
     * @return 项目成本预估项次
     */
    @Override
    public List<GcProjectCbpjitem> selectGcProjectCbpjitemList(GcProjectCbpjitem gcProjectCbpjitem)
    {
        return gcProjectCbpjitemMapper.selectGcProjectCbpjitemList(gcProjectCbpjitem);
    }

    /**
     * 新增项目成本预估项次
     * 
     * @param gcProjectCbpjitem 项目成本预估项次
     * @return 结果
     */
    @Override
    public int insertGcProjectCbpjitem(GcProjectCbpjitem gcProjectCbpjitem)
    {
        return gcProjectCbpjitemMapper.insertGcProjectCbpjitem(gcProjectCbpjitem);
    }

    /**
     * 修改项目成本预估项次
     * 
     * @param gcProjectCbpjitem 项目成本预估项次
     * @return 结果
     */
    @Override
    public int updateGcProjectCbpjitem(GcProjectCbpjitem gcProjectCbpjitem)
    {
        return gcProjectCbpjitemMapper.updateGcProjectCbpjitem(gcProjectCbpjitem);
    }

    /**
     * 批量删除项目成本预估项次
     * 
     * @param ids 需要删除的项目成本预估项次主键
     * @return 结果
     */
    @Override
    public int deleteGcProjectCbpjitemByIds(String ids)
    {
        return gcProjectCbpjitemMapper.deleteGcProjectCbpjitemByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除项目成本预估项次信息
     * 
     * @param id 项目成本预估项次主键
     * @return 结果
     */
    @Override
    public int deleteGcProjectCbpjitemById(Long cbpjId)
    {
        return gcProjectCbpjitemMapper.deleteGcProjectCbpjitemById(cbpjId);
    }

	@Override
	public List<GcProjectCbpjitem> selectGcProjectCbpjitemByCbpjId(Long cbpjId) {
		return gcProjectCbpjitemMapper.selectGcProjectCbpjitemByCbpjId(cbpjId);
	}
}